package model

import (
	"gorm.io/gorm"
	"time"
)

type Shop struct {
	Id        uint           `gorm:"column:id;type:bigint(20) UNSIGNED;primaryKey;not null;" json:"id"`
	Name      string         `gorm:"column:name;type:char(30);" json:"name"`
	Image     string         `gorm:"column:image;type:char(255);" json:"image"`
	Info      string         `gorm:"column:info;type:char(255);" json:"info"`
	CreatedAt time.Time      `gorm:"column:created_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"created_at"`
	UpdatedAt time.Time      `gorm:"column:updated_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"updated_at"`
	DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:datetime;default:NULL;" json:"deleted_at"`
	UserId    uint           `gorm:"column:user_id;type:bigint(20) UNSIGNED;not null;" json:"user_id"`
}

func (s *Shop) TableName() string {
	return "shop"
}
